<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->

<div layout="row">
  <md-input-container>
    <label>Low threshold</label>
    <input
      ng-model="$ctrl.condition.thresholdLow"
      required
      type="number"
      min="1"
      name="thresholdLow"
      aria-label="trigger threshold low"
      ng-disabled="$ctrl.isReadonly"
    />
    <!--
    <div class="hint">
      The low threshold value.
    </div>
    -->
    <div ng-messages="$ctrl.formAlert.thresholdLow.$error">
      <div ng-message="required">Threshold is required.</div>
      <div ng-message="min">Threshold must be higher than 0.</div>
    </div>
  </md-input-container>

  <span flex="10" style="display: grid; align-items: center" align="center"> and </span>

  <md-input-container>
    <label>High threshold</label>
    <input
      ng-model="$ctrl.condition.thresholdHigh"
      required
      type="number"
      min="{{$ctrl.condition.thresholdLow}}"
      name="thresholdHigh"
      aria-label="trigger threshold high"
      ng-disabled="$ctrl.isReadonly"
    />
    <!--
    <div class="hint">
      The high threshold value.
    </div>
    -->
    <div ng-messages="$ctrl.formAlert.thresholdHigh.$error">
      <div ng-message="required">Threshold is required.</div>
      <div ng-message="min">Threshold must be higher than 0.</div>
    </div>
  </md-input-container>
</div>
